<%--
  Created by IntelliJ IDEA.
  User: Kohler
  Date: 2022/11/25
  Time: 15:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>查看所有建议</title>
  <link rel="stylesheet" type="text/css" href="${path}css/common.css"/>
  <link rel="stylesheet" type="text/css" href="${path}css/main.css"/>
  <script>
    function Delete(mess,url){
      if(confirm(mess)){
        location.href=url;
      }
    }
    function selall(o){
      var a = document.getElementsByName('id[]');
      for(var i=0;i<a.length;i++){
        a[i].checked = o.checked;
      }
    }
  </script>
</head>
<body>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" +request.getServerName() + ":" + request.getServerPort() + path + "/";
  request.setAttribute("path",basePath);
%>
<%@include file="adminSidebar.jsp"%>
<div class="main-wrap">

  <div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="studentManage.jsp">首页</a><span class="crumb-step"></span><span class="crumb-name">查看座位情况</span></div>
  </div>
  <div class="search-wrap">
    <div class="search-content">
    </div>
  </div>
  <div class="result-wrap">
    <form name="myform" id="myform" method="post">
      <div class="result-title">
        <div class="result-list">
        </div>
      </div>
      <div class="result-content">
        <table class="result-tab" width="100%">
          <tr>

            <th>学号</th>
            <th>姓名</th>
            <th>班级</th>
            <th>标题</th>
            <th>内容</th>
            <th>操作</th>
          </tr>
          <c:forEach var="aa"  items="${adviceAllList}">
          <tr>
            <td>${aa.sno}</td>
            <td>${aa.sname}</td>
            <td>${aa.sclass}</td>
            <td>${aa.title}</td>
            <td>${aa.content}</td>
            <td>
              <a class="link-del" href="javascript:Delete('你确定删除【${aa.title}】这条建议吗?','http://localhost:8080/Library/admin/adminDeleteAdvice?title=${aa.title}')">删除</a>
            </td>
            </c:forEach>
        </table>
        <div class="list-page">
          共${tsum}条记录，当前${cpage}/${tpage}页
          <a href="http://localhost:8080/Library/admin/adminAdviceSelectAll?cp=1${searchParams}">首页</a>
          <a href="http://localhost:8080/Library/admin/adminAdviceSelectAll?cp=${cpage-1 < 0? 1:cpage-1}${searchParams}">上一页</a>
          <a href="http://localhost:8080/Library/admin/adminAdviceSelectAll?cp=${cpage+1>tpage?tpage:cpage+1}${searchParams}">下一页</a>
          <a href="http://localhost:8080/Library/admin/adminAdviceSelectAll?cp=${tpage}${searchParams}">尾页</a>
        </div>
      </div>
    </form>
  </div>
</div>
<!--/main-->
</div>

</body>
</html>
